<%@ page language="java"  pageEncoding="UTF-8"%>
<%@ include file="/views/commons/taglibs.jsp" %>
<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>众秀众筹</title>
	<meta name="Keywords" content="活动，众筹平台" />
	<meta name="Description" content="汇集各行业高手分析众筹项目，行业问答，众筹资讯。" />
	<meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible" />
	<meta name="renderer" content="webkit"/>
	<link rel="stylesheet" href="<%=path%>/css/bootstrap/3.3.5/css/bootstrap.min.css" />
	<link rel="stylesheet" href="<%=path%>/css/cz.css" />

	<script src="<%=path%>/js/jquery-1.11.0.min.js"></script>

	<script src="<%=path%>/js/slider.js"></script>
	<script src="<%=path%>/js/common.js"></script>
	<script type="text/javascript" src="<%=path %>/js/plugins/ProJson.js" ></script>
    <script type="text/javascript">
        $(function () {
        	var province_value="${activity.activityProvince}";
            $.each(province, function (k, p) { 
                var javascript_code="javascript:setHiddenValue('activity_province_hid','"+p.ProName+"');queryActivityList(1)";
                var option ="<li onclick=\""+javascript_code+"\"><a href='javascript:void(0);'><span>"+p.ProName+"</span></a></li>";               
                $("#selProvince").append(option);
            });
            $('.selection li').click(function(event) {
        		$(this).addClass('cur').siblings().removeClass('cur'); /* 单选 */
        	});
        });
        function selectActivityType(type){
        	if(type==1){
        		$("#selProvince_div").show();
        	}else if(type==2){
        		$("#provinec_all").click();
        		$("#selProvince_div").hide();
        		$("#activity_type_hid").val("");    		
        	}else{
        		$("#selProvince_div").show();
        	}
        }
    </script>
<body class="gray-bg">
<jsp:include page="/views/commons/header.jsp"></jsp:include>
<div class="container page-single">
	<div class="col-md-12">
		<form id="activity_choose_form" action="javascript:void(0)">
		<div class="panel panel-default">
			<div class="panel-body">
				<div class="filter-wrap">
					<dl class='clearfix invest-filter'>
						<dt>活动类型 :</dt>
						<dd class='clearfix'>
							<ul class='selection clearfix'>
								<li class='all cur' onclick="javascript:setHiddenValue('activity_type_hid','');selectActivityType(0);queryActivityList(1)"><a href='javascript:void(0);'><span>全部</span></a></li>
								<li onclick="javascript:setHiddenValue('activity_type_hid','1');selectActivityType(1);queryActivityList(1)"><a href='javascript:void(0);'><span>线下活动</span></a></li>
								<li onclick="javascript:setHiddenValue('activity_type_hid','2');selectActivityType(2);"><a href='javascript:void(0);'><span>线上直播</span></a></li>
							</ul>
						</dd>
					</dl>
					<input type='hidden' name='activityType' id='activity_type_hid' value='${activity.activityType}' />
					<dl class="clearfix invest-filter addr" id="selProvince_div">
						<dt>地点：</dt>
						<dd class="clearfix">
							<ul class="selection clearfix" id="selProvince">
								<li id="provinec_all" class='all cur' onclick="javascript:setHiddenValue('activity_province_hid','');queryActivityList(1)">
									<a href='javascript:void(0);'><span>全部</span></a>
								</li>
							</ul>
						</dd>
					</dl>
					<input type='hidden' name='activityProvince' id='activity_province_hid' value='${activity.activityProvince}' />
				</div>
			</div>
		</div>
		</form>
		<div id="activity_list_div"></div>
	</div>
</div>
<jsp:include page="/views/commons/footer.jsp"></jsp:include>
</body>
<script type="text/javascript">
$(document).ready(function(){
	queryActivityList(1);
});

function queryActivityList(pageNo){
	
	var queryData=$("#activity_choose_form").serialize();
	
	if(queryData==null||queryData==""){
		queryData="pageNo="+pageNo;
	}else{
		queryData=queryData+"&pageNo="+pageNo;
	}
	
	$.ajax({
		url : path + "/uncheck/activity/list",
		type : "get",
		dataType : "html",
		data :queryData,
		success : function(data)
		{
			$("#activity_list_div").html(data);
		},error:function(){
			layer.msg("服务器网络繁忙",{icon: 2});
		}
	});
}
</script>
</html>